

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>script &mdash; pySVG 0.2.1 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.2.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pySVG 0.2.1 documentation" href="../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../index.html">pySVG 0.2.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="script">
<h1>script<a class="headerlink" href="#script" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-script">
<h2>Module: <tt class="xref py py-mod docutils literal"><span class="pre">script</span></tt><a class="headerlink" href="#module-script" title="Permalink to this headline">¶</a></h2>
<p>Inheritance diagram for <tt class="docutils literal"><span class="pre">pysvg.script</span></tt>:</p>
<span class="target" id="module-pysvg.script"></span><p>(C) 2008, 2009 Kerim Mansour
For licensing information please refer to license.txt</p>
</div>
<div class="section" id="id1">
<h2><a class="reference internal" href="#pysvg.script.Script" title="pysvg.script.Script"><tt class="xref py py-class docutils literal"><span class="pre">Script</span></tt></a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="pysvg.script.Script">
<em class="property">class </em><tt class="descclassname">pysvg.script.</tt><tt class="descname">Script</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#pysvg.script.Script" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="pysvg.core.html#pysvg.core.BaseElement" title="pysvg.core.BaseElement"><tt class="xref py py-class docutils literal"><span class="pre">pysvg.core.BaseElement</span></tt></a>, <a class="reference internal" href="pysvg.attributes.html#pysvg.attributes.CoreAttrib" title="pysvg.attributes.CoreAttrib"><tt class="xref py py-class docutils literal"><span class="pre">pysvg.attributes.CoreAttrib</span></tt></a>, <a class="reference internal" href="pysvg.attributes.html#pysvg.attributes.XLinkAttrib" title="pysvg.attributes.XLinkAttrib"><tt class="xref py py-class docutils literal"><span class="pre">pysvg.attributes.XLinkAttrib</span></tt></a></p>
<p>Class representing the script element of an svg doc.</p>
<dl class="method">
<dt id="pysvg.script.Script.__init__">
<tt class="descname">__init__</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.addElement">
<tt class="descname">addElement</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.addElement" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.appendTextContent">
<tt class="descname">appendTextContent</tt><big>(</big><em>text</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.appendTextContent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getAllElements">
<tt class="descname">getAllElements</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.getAllElements" title="Permalink to this definition">¶</a></dt>
<dd><p>returns all elements contained within the top level element list of this element</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getAllElementsOfHirarchy">
<tt class="descname">getAllElementsOfHirarchy</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.getAllElementsOfHirarchy" title="Permalink to this definition">¶</a></dt>
<dd><p>returns ALL elements of the complete hirarchy as a flat list</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getAttribute">
<tt class="descname">getAttribute</tt><big>(</big><em>attribute_name</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.getAttribute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getAttributes">
<tt class="descname">getAttributes</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.getAttributes" title="Permalink to this definition">¶</a></dt>
<dd><p>get all atributes of the element</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getElementAt">
<tt class="descname">getElementAt</tt><big>(</big><em>pos</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.getElementAt" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the element at a specific position within this svg</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getElementByID">
<tt class="descname">getElementByID</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.getElementByID" title="Permalink to this definition">¶</a></dt>
<dd><p>returns an element with the specific id and the position of that element within the svg elements array</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getElementsByType">
<tt class="descname">getElementsByType</tt><big>(</big><em>type</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.getElementsByType" title="Permalink to this definition">¶</a></dt>
<dd><p>retrieves all Elements that are of type type
&#64;type  type: class 
&#64;param type:  type of the element</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.getXML">
<tt class="descname">getXML</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.getXML" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a XML representation of the current element.
This function can be used for debugging purposes. It is also used by getXML in SVG</p>
<p>&#64;return:  the representation of the current element as an xml string</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_id">
<tt class="descname">get_id</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_type">
<tt class="descname">get_type</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_actuate">
<tt class="descname">get_xlink_actuate</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_actuate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_arcrole">
<tt class="descname">get_xlink_arcrole</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_arcrole" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_href">
<tt class="descname">get_xlink_href</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_href" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_role">
<tt class="descname">get_xlink_role</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_role" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_show">
<tt class="descname">get_xlink_show</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_show" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_title">
<tt class="descname">get_xlink_title</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_title" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xlink_type">
<tt class="descname">get_xlink_type</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xlink_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xml_base">
<tt class="descname">get_xml_base</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xml_base" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xml_lang">
<tt class="descname">get_xml_lang</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xml_lang" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.get_xml_space">
<tt class="descname">get_xml_space</tt><big>(</big><big>)</big><a class="headerlink" href="#pysvg.script.Script.get_xml_space" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.insertElementAt">
<tt class="descname">insertElementAt</tt><big>(</big><em>element</em>, <em>pos</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.insertElementAt" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.quote_attrib">
<tt class="descname">quote_attrib</tt><big>(</big><em>inStr</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.quote_attrib" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms characters between xml notation and python notation.</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.save">
<tt class="descname">save</tt><big>(</big><em>filename</em>, <em>encoding='ISO-8859-1'</em>, <em>standalone='no'</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.save" title="Permalink to this definition">¶</a></dt>
<dd><p>Stores any element in a svg file (including header). 
Calling this method only makes sense if the root element is an svg elemnt</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.setAttribute">
<tt class="descname">setAttribute</tt><big>(</big><em>attribute_name</em>, <em>attribute_value</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.setAttribute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.setKWARGS">
<tt class="descname">setKWARGS</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.setKWARGS" title="Permalink to this definition">¶</a></dt>
<dd><p>Used to set all attributes given in a <a href="#id2"><span class="problematic" id="id3">**</span></a>kwargs parameter.
Might throw an Exception if attribute was not found.
#TODO: check if we should fix this using &#8220;setAttribute&#8221;</p>
</dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_id">
<tt class="descname">set_id</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_type">
<tt class="descname">set_type</tt><big>(</big><em>type</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_actuate">
<tt class="descname">set_xlink_actuate</tt><big>(</big><em>xlink_actuate</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_actuate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_arcrole">
<tt class="descname">set_xlink_arcrole</tt><big>(</big><em>xlink_arcrole</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_arcrole" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_href">
<tt class="descname">set_xlink_href</tt><big>(</big><em>xlink_href</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_href" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_role">
<tt class="descname">set_xlink_role</tt><big>(</big><em>xlink_role</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_role" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_show">
<tt class="descname">set_xlink_show</tt><big>(</big><em>xlink_show</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_show" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_title">
<tt class="descname">set_xlink_title</tt><big>(</big><em>xlink_title</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_title" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xlink_type">
<tt class="descname">set_xlink_type</tt><big>(</big><em>xlink_type</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xlink_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xml_base">
<tt class="descname">set_xml_base</tt><big>(</big><em>xml_base</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xml_base" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xml_lang">
<tt class="descname">set_xml_lang</tt><big>(</big><em>language_code</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xml_lang" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.set_xml_space">
<tt class="descname">set_xml_space</tt><big>(</big><em>xml_space</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.set_xml_space" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pysvg.script.Script.wrap_xml">
<tt class="descname">wrap_xml</tt><big>(</big><em>xml</em>, <em>encoding='ISO-8859-1'</em>, <em>standalone='no'</em><big>)</big><a class="headerlink" href="#pysvg.script.Script.wrap_xml" title="Permalink to this definition">¶</a></dt>
<dd><p>Method that provides a standard svg header string for a file</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">script</a><ul>
<li><a class="reference internal" href="#module-script">Module: <tt class="docutils literal"><span class="pre">script</span></tt></a></li>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">Script</span></tt></a></li>
</ul>
</li>
</ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/generated/pysvg.script.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../index.html">pySVG 0.2.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Kerim Mansour.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>